package com.ikonke.iot.alarm;

import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.util.concurrent.DefaultThreadFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication/*(exclude = DataSourceAutoConfiguration.class)*/
@EnableScheduling
@EnableAsync
@MapperScan(basePackages = "com.ikonke.iot.alarm.mapper")
public class IotAlarmApplication {

    public static void main(String[] args) {
        SpringApplication.run(IotAlarmApplication.class, args);
    }

    @Bean
    public EventLoopGroup eventLoopGroup() {
        return new NioEventLoopGroup(10, new DefaultThreadFactory("iot_alarm_thread_"));
    }

}
